<template>
  <div>
    这是父组件
    <child>
        <div class="tmp1">
          <ul>
            <li v-for="(item,index) in list" v-bind:key="index">
                {{item}}
            </li>
          </ul>
        </div>
    </child>
  </div>
</template>

<script>
import child from '@/components/child'
export default {
  name: 'Bar',
  components:{ child },
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      list:[
          1,
          2,
          3,
          4,
          5
      ]
    }
  },
  mounted(){
    console.log(this.$route.params.id)
    console.log(this.$route.params.name)
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
